package jodis.conn.impl;

import jodis.conn.inter.IReply;

import java.nio.charset.StandardCharsets;

public class StatusReply implements IReply {
    private String status;

    public StatusReply(String s) {
        status = s;
    }

    public static StatusReply MakeStatusReply(String status) {
        return new StatusReply(status);
    }

    @Override
    public byte[] toBytes() {
        return String.format("+%s\r\n", status).getBytes(StandardCharsets.UTF_8);
    }
}
